<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			{{msg}}
			<my-conponent @abc="sove"></my-conponent>
		</div>
		<script src="js/vue2.5.js"></script>
		<script>
			Vue.component('my-conponent',{
				template:`
					<div>
					  <button @click="add">add</button>
					</div>
				`,
				data(){
					return{
						count : 1
					}
				},
				methods:{
					add(){
						this.count++;
						this.$emit('abc',this.count);
				   }
				}
			})
			var vm = new Vue({
				el:'#app',
				data:{
					msg : ''
				},
				methods:{
					sove(count){
						this.msg = count;
					}
				}
			})
		</script>
	</body>
</html>
